<?php

class Zend_View_Helper_Categorys
{
    public $view;

    public function categorys ()
    {
        $html = "<h2>Разделы</h2>";
        $blogService = Service_Blog::getInstance();
        $html .= '<ul class="content">';
        foreach($blogService->getAllBlogs() as $blog){
            $html .= '<li><a href="/blog/view/id/' . $blog->id . '">' . $blog->name . '</a></li>';
        }
        $html .= '</ul>';
        return $html;
    }

    public function setView (Zend_View_Interface $view)
    {
        $this->view = $view;
    }
}